<!-- 询问医生详情 -->
<template>
	<view class="doctor-detail-wrapper">
		<h1>{{doctor.z_name}}</h1>
		<p>{{doctor.ctname}} {{doctor.zhicheng}}</p>
		<p>{{doctor.level_name}} - {{doctor.agentname}}</p>
		<p></p>
		<uni-section title="主治擅长" type="line">
			<view class="tag-view" v-for="(item, index) in doctor.authority" :key="index">
				<uni-tag :inverted="true" :text="item.bq + item.cout" />
			</view>
			<!-- <u-tag :text="item.bq" plain size="mini" v-for="(item, index) in doctor.authority" :key="index"></u-tag> -->
		</uni-section>

		<view class="bottom-tabbar">
			<view class="submit-btn" @click="goToImageTextInquiry">
				<p>立即询问</p>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				doctor: {},
				zhuanJiaServiceList: [],
				zid: ''
			}
		},
		onLoad(option) {
			this.loadDoctor(option.zid)
			this.zid = option.zid
		},
		methods: {
			loadDoctor(zid) {
				this.$app._get('entry/wxapp/zhuanjia.getdocinfo', {
					zid: zid
				}, (result) => {
					this.doctor = result
					console.log(result)
				})
			},
			/**
			 * 获取专家服务
			 */
			goToImageTextInquiry() {
				uni.navigateTo({
					url: "/pages/onlineInquiry/imageTextInquiry?zid=" + this.zid
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.doctor-detail-wrapper {
		width: 100%;
		height: 100%;
		padding: 10px;
		background-color: #fff;
		box-sizing: border-box;

		h1 {
			font-size: 1.5rem;
		}

		p {
			color: #757575;
		}

		.tag-view {
			display: inline-block;
			margin-bottom: 15px;
			margin-right: 5px;
		}

		.bottom-tabbar {
			position: fixed;
			left: 0;
			bottom: 0;
			width: 100%;
			height: 60px;
			padding-bottom: 20px;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.submit-btn {
				width: 100%;
				height: 40px;
				background-color: #41C277;
				text-align: center;

				p {
					color: #fff;
					font-size: 1rem;
					line-height: 40px;
				}
			}
		}

		.zj-service {
			position: relative;
			display: flex;
			flex-direction: row;
			border-bottom: 1px solid #EEEEEE;
			background-color: #fff;
			padding: 12px 15px;

			.left-icon {
				width: 50px;
				height: 50px;
				border-radius: 50px;
				background-color: #2096F3;
				display: flex;
				flex-direction: row;
				align-items: center;
				text-align: center;
				justify-content: center;

				image {
					width: 30px;
					height: 30px;
				}
			}

			.center-wrapper {
				display: flex;
				flex: 1;
				flex-direction: column;
				padding-left: 10px;
				font-size: 1rem;

				.sub-p {
					font-size: 0.9rem;
					color: #4caf50;
				}
			}

			.right-label {
				display: flex;
				flex-direction: row;
				justify-content: flex-end;
				align-items: center;

			}
		}
	}
</style>